﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo.EventBus
{
    /// <summary>
    /// 示例订阅者类
    /// </summary>
    public class TestEventSubscriber : IEventSubscriber
    {
        /// <summary>
        /// 动作A
        /// </summary>
        /// <param name="eventData"></param>
        [EventSubscribe("Register")]
        public void ActionA(object eventData)
        {
            Console.WriteLine($"执行了动作A EventData为: {eventData}");
        }
        /// <summary>
        /// 动作B
        /// </summary>
        /// <param name="eventData"></param>
        [EventSubscribe("Register")]
        public void ActionB(object eventData)
        {
            Console.WriteLine($"执行了动作B EventData为: {eventData}");
        }
        /// <summary>
        /// 动作C
        /// </summary>
        /// <param name="eventData"></param>
        [EventSubscribe("Register")]
        public void ActionC(object eventData)
        {
            Console.WriteLine($"执行了动作C EventData为: {eventData}");
        }


        /// <summary>
        /// 动作D
        /// </summary>
        /// <param name="eventData"></param>
        [EventSubscribe("Login")]
        public void ActionD(object eventData)
        {
            Console.WriteLine($"执行了动作D EventData为: {eventData}");
        }
    }
}
